package cn.jeefast.rest.controller;


import cn.jeefast.common.entity.MbFeedback;
import cn.jeefast.common.utils.R;
import cn.jeefast.rest.service.MbFeedbackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author theodo
 * @since 2020-01-10
 */
@RestController
@RequestMapping("/api")
public class MbFeedbackController {

    @Autowired
    private MbFeedbackService mbFeedbackService;

    /**
     * 添加反馈
     * @return
     */
    @RequestMapping("/feedback/insert")
    public R insert(MbFeedback feedback){
        feedback.setTimes(new Date());
        mbFeedbackService.insert(feedback);
        return R.ok();
    }
}
